package com.ehome.poct.terminal.mapping;

import com.ehome.core.page.PageInfo;
import com.ehome.poct.core.api.dto.order.TestStripPriceProfitDTO;
import com.ehome.poct.core.api.dto.report.PriceProfitDTO;
import com.ehome.poct.core.api.dto.report.ProfitDTO;
import com.ehome.poct.core.api.vo.order.TestStripPriceProfitSchemeVO;
import com.ehome.poct.core.api.vo.order.TestStripPriceProfitVO;
import com.ehome.poct.core.api.dto.PriceProfitNums;
import com.ehome.poct.core.api.vo.PriceProfitVO;
import com.ehome.poct.core.api.vo.ProfitNameVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;

import java.util.ArrayList;
import java.util.List;

/**
 * @author muqiu
 * @since 2022/07/04 17:37
 **/
@Mapper(componentModel = "spring")
public interface TestStripPriceProfitMapping {
    @Mapping(target = "yhProfits", constant = "0")
    @Mapping(target = "disable",constant = "0")
    TestStripPriceProfitDTO to(Long testStripPriceProfitSchemeId, ProfitDTO r);

    PriceProfitDTO to(String priceProfitSchemeName, List<TestStripPriceProfitVO> profitList);

    ProfitDTO to(TestStripPriceProfitVO profit);

    PageInfo<PriceProfitVO> to(PageInfo<TestStripPriceProfitSchemeVO> profitSchemes);

    void to(@MappingTarget TestStripPriceProfitSchemeVO r, PriceProfitNums priceProfitNums);

    List<ProfitNameVO> to(ArrayList<TestStripPriceProfitSchemeVO> list);
}
